﻿@model ZX.HIS.Model.DrugWareHouse

@{
    ViewBag.Title = "UptDrugWareHouse";
    Layout = "~/Views/Shared/_ViewMenu.cshtml";
}
<script>

    $(function () {
        $(document).keydown(function (event) {
            if (event.keyCode == 13) {
                $("#btnAdd").click();
            }
        });
    })
    $(function () {
        $("#btnAdd").click(function () {
           
            $.ajax({
                type: "post",
                url: "/DrugWareHouse/DrugWareHouseUptdate",
                data: {
                    NewsInfoId: $("#NewsInfoId").val(),
                    NewsInfoTitle: $("#NewsInfoTitle").val(),
                    NewsInfoAuthor: $("#NewsInfoAuthor").val(),
                    NewsInfoSource: $("#NewsInfoSource").val(),
                    NewsInfoContent: $("#NewsInfoContent").val(),
                    NewsTypeId: $("#NewsTypeId").val(),

                    DrugWareNumber:$("#DrugWareNumber").val(),
                    DrugWareBatchNo:$("#DrugWareBatchNo").val(),
                    DrugWareTime:$("#DrugWareTime").val(),
                    DrugPurchasePrice:$("#DrugPurchasePrice").val(),
                    DrugWarePresPrice:$("#DrugWarePresPrice").val(),
                    DrugWareId: $("#DrugWareId").val()
                },
                success: function (data) {
                    if (data == 1) {
                        location.href = '/DrugWareHouse/DrugWareHouseshow';
                    }
                    else {
                        alert("修改失败");
                    }
                }
            })
        })
    })
</script>
<div class="mainBox" style="height:auto!important;height:550px;min-height:550px;">
    <h2 class="boxTitle">编辑库存</h2>
    <form method="post" id="form1" action="/NewsInfo/uptNews">
        <button type="button" class="btn btn-info" id="btnAdd">
            <span class="glyphicon glyphicon-search">更新</span>
        </button>
        <button type="button" class="btn btn-info">
            <span class="glyphicon glyphicon-search" href="/DrugWareHouse/DrugWareHouseshow">取消</span>
        </button>
        <div class="item">
            <h2>基本信息</h2>
            <table style="margin-left:30px">
                <tr style="height:30px;">
                    <td style="text-align:right;">　药品名称：</td>
                    <td>@Model.DrugWareName @Html.HiddenFor(p => p.DrugWareId)</td>
                    <td>药品规格</td>
                    <td>@Model.DrugWarePackSpece</td>
                </tr>

                <tr style="height:30px;">
                    <td>生产厂家：</td>
                    <td>@Model.ProductName</td>

                </tr>
            </table>
            <h2>库存信息</h2>
            <table>
                <tr>
                    <td>批次库存：</td>
                    <td>
                     
                        <input id="DrugWareNumber" class="inpMain" type="text" name="DrugWareNumber" value="@Model.DrugWareNumber" />

                </td>
                <td>批号：</td>
                <td>
                    <input id="DrugWareBatchNo" class="inpMain" type="text" name="DrugWareBatchNo" value="@Model.DrugWareBatchNo" />
                    </td>
            </tr>

            <tr style="height:30px;">
                <td>有效期：</td>
                <td>
                    <input id="DrugWareTime" class="inpMain" type="text" name="DrugWareTime" value="@Model.DrugWareTime" />
                </td>

            </tr>
            <tr>
                <td>进货价</td>
                <td>
                    <input id="DrugPurchasePrice" class="inpMain" type="text" name="DrugPurchasePrice" value="@Model.DrugPurchasePrice" />
                </td>
                <td>处方价</td>
                <td>
                    <input id="DrugWarePresPrice" class="inpMain" type="text" name="DrugWarePresPrice" value="@Model.DrugWarePresPrice" />
                </td>
            </tr>

        </table>



    </div>
</form>
</div>
